// 导入定义验证规则的包
const joi = require('joi')

const account = joi.string().alphanum().min(5).max(20).required()
const password = joi.string().min(5).max(20).required()
const nickname = joi.string().max(8).required()

//
//
// 定义注册账号的规则对象
exports.register_schema = {
  body: { account, password },
}

// 定义账号登录的规则对象
exports.login_schema = {
  body: { account, password },
}

// 定义修改信息
exports.modifyInfo_schema = {
  body: { nickname },
}